<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/assets/css/layui.css">
    <link rel="stylesheet" href="/static/assets/css/admin.css">
    <link rel="icon" href="/favicon.ico">
    <title>日志检索中台</title>
</head>
<style>
    .custom-logo{
        text-align: center;
        margin: 0 0;
    }
</style>
<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header custom-header">

            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item slide-sidebar" lay-unselect>
                    <a href="javascript:;" class="icon-font"><i class="ai ai-menufold"></i></a>
                </li>
            </ul>

            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">{{.username}}</a>
                    <dl class="layui-nav-child">
                        <!--<dd><a href="/admin/toLogin">退出</a></dd>-->
                        <!-- js post 请求 前端 js 跳转 -->
                        <dd><a href="javascript:void(0)" onclick="do_exit()">退出</a></dd>
                        <!-- a 标签 get 访问 后台重定向跳转 -->
                        <!-- <a href='{{urlfor "UserController.Exit"}}' onclick="do_exit()">退出</a> -->
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-side custom-admin">
            <div class="layui-side-scroll">

                <div class="custom-logo">
                    <h1>Gos Logs</h1>
                </div>
                <ul id="Nav" class="layui-nav layui-nav-tree">
                    <li class="layui-nav-item">
                        <a href="/admin/console">
                            <i class="layui-icon">&#xe68e;</i>
                            <em>控制台</em>
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="/client/index">
                            <i class="layui-icon">&#xe7ae;</i>
                            <em>客户端管理</em>
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="/item/index">
                            <i class="layui-icon">&#xe653;</i>
                            <em>项目日志管理</em>
                        </a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="/logs/index">
                            <i class="layui-icon">&#xe609;</i>
                            <em>项目日志检索</em>
                        </a>
                    </li>
                </ul>

            </div>
        </div>

        <div class="layui-body">
             <div class="layui-tab app-container" lay-allowClose="true" lay-filter="tabs">
                <ul id="appTabs" class="layui-tab-title custom-tab"></ul>
                <div id="appTabPage" class="layui-tab-content"></div>
            </div>
        </div>

        <div class="mobile-mask"></div>
    </div>
    <script src="/static/js/jquery-3.5.1.min.js"></script>
    <script src="/static/assets/layui.js"></script>
    <script src="/static/js/index.js" ></script>
    <script src="/static/js/home.js" ></script>
    <script>
        function do_exit(){
            $.ajax({
                url:'{{urlfor "UserController.Exit"}}',
                data:{},
                type:"post",
                dataType:'json',
                success:function(){
                    window.location.href = '/admin/login'
                }
            });
        }
    </script>
</body>
</html>